home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wildcat Files 2
/
The Wildcat Files 2 (Arsenal Computer).ISO
/
wildcat
/
release.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-04-02
|
4KB
|
103 lines
{RESPONSIBILITY: SLR}
(******************************************************************
Global record structure for wcUUCP! version 3.90B.
Copyright 1986,94 Mustang Software Inc. All rights reserved.
Last Revised 12-23-93
******************************************************************)
type
TWCUUCPConfig = record {wcUUCP.CFG file}
Filler : Array [1..117] of byte; {Expansion}
UUCP_Admin : Str25; {Administrators name}
UUCP_EmailConf : Word; {Conference for Email}
UUCP_Domain : String; {Domain name}
UUCP_Organization : Str80; {Organization string}
UUCP_Distribution : Str80; {Distribution string}
UUCP_ImportPath : DirStr; {Import path}
UUCP_ExportPath : DirStr; {Export path}
UUCP_DeletePackets : Boolean; {Delete files after import?}
UUCP_SiteName : Str80; {Host Site name}
UUCP_GMT_HourOfs : Integer; {Hours offset from GMT}
UUCP_GMT_MinOfs : Byte; {Minutes offset from GMT}
UUCP_AttachLimit : LongInt; {Total outgoing attachment limit}
UUCP_Satellite : Boolean; {Satellite?}
UUCP_PageSatBagPath: DirStr; {Satellite import path}
UUCP_OurSiteName : String; {Also in SITENAME.TXT}
UUCP_WaffleSupport : Boolean; {Use Waffle UUCICO?}
end;
NewsGroupRec = record {NEWSGRPS.DAT file!}
GroupName : String; {Usenet NewsGroup name}
Conference: Word; {WildCat! Conference Number}
end;
TrnType = (TrnImport, TrnExport, TrnBoth, TCanImport, TCanExport);
KeyType = (InternalName, ExternalName);
PTransRec = ^TTransRec; {WCUUCP.DAT/.IX -- BTREE FILER DATABASE!}
TTransRec = record
Status : LongInt; {Deleted?}
Name : Str25; {Internal name Wildcat Name}
TranName: String; {External name}
Flag : Byte; {Translate type}
end;
{Below is the constructor to create the Translate database!}
constructor TTransObj.Init(TrnFile : PathStr);
var
IID : IsamIndDescr;
begin
if NOT ExistFile(TrnFile+'.DAT') then
begin
IID[1].KeyL := 25;
IID[2].KeyL := 5;
IID[3].KeyL := 30;
IID[1].AllowDupK := True;
IID[2].AllowDupK := False;
IID[3].AllowDupK := True;
BTCreateFileBlock(TrnFile, SizeOf(TTransRec), 3, IID);
if NOT IsamOk then
Fail;
end;
BTOpenFileBlock(pf, TrnFile, False, False, False, False);
if NOT IsamOk then
Fail;
end;
{Build key routines}
function TTransObj.BuildKey(KeyNum : Byte; const Name : String) : IsamKeyStr;
var
Key : String;
Crc : LongInt;
Cnt : Byte;
begin
case KeyNum of
1:begin
Key := Name;
BuildKey := Pad(StUpCase(Trim(Key)), 25);
end;
2:begin
Crc := -1;
Key := StUpCase(Trim(Name));
for Cnt := 1 to Length(Key) do
Crc := UpdateCrc32(Byte(Key[Cnt]), Crc);
BuildKey := LongToKey(Crc)+Chr(Length(Key));
end;
3:begin
Key := Copy(Name, 1, 30);
BuildKey := Pad(StUpCase(Key), 30);
end;
end;
end;